package cn.tedu.egmvc1.controller;

import cn.tedu.egmvc1.controller.DTO.AddNameDTO;
import cn.tedu.egmvc1.controller.DTO.UpdateDto;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class EmpController {
    @RequestMapping("/emp/insert")
    @ResponseBody
    public String insert(AddNameDTO addNameDTO){
        System.out.println(addNameDTO);
        return "添加成功";
    }
    @RequestMapping("/emp/select")
    @ResponseBody
    public String select(){
        return "恭喜，查询成功";
    }
    @RequestMapping("emp/update")
    @ResponseBody
    public String update(UpdateDto updateDto){
        System.out.println(updateDto);
        return "修改成功";
    }
    @RequestMapping("emp/delete")
    @ResponseBody
    public String delete(Integer id){
        return "删除成功";
    }
}
